To run scripts using the Windows-based script host (Wscript.exe)
-
From the command prompt or the Run dialog box, type:
wscript.exe
and then click OK or press ENTER on your keyboard.
-
Set the script host properties you want, and then click OK.
-
From Windows Explorer or My Computer, double-click the script file you want to run.
Notes
-
If you double-click a script file whose extension has not yet been associated with wscript.exe, an Open With dialog box appears asking you what program you would like to use to open the file you double-clicked. After choosing Windows Based Script Host (wscript.exe), if you check the Always use this program to open these files check box, wscript will be registered as the default application for all files having the same extension as the one you double-clicked. For example, if you check this check box when you run chart.vbs, wscript.exe becomes the default application for all files having the .vbs extension.
- The wscript.exe properties page lets you set global scripting properties for all scripts that wscript.exe runs on the . It is also possible to set properties for individual scripts. See Related Topics for information on how to do this.
- You can also set properties for an individual script by right-clicking a script file in My Computer or Windows Explorer, clicking Properties and then selecting the Script tab.
-
Windows Script Host also enables you to create .ws script files, with which you can call multiple scripting engines and perform multiple jobs, all from one file. For more information about these files, see the Windows Script Technologies Web site at the Microsoft Web site (http://www.microsoft.com/).
Related Topics